//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class PresetLineDashProperties : LineDashProperties
    {
        public PresetLineDashProperties()
        {
            
        }

        public PresetLineDashProperties(PresetLineDashValue value)
        {
            this.Value = value;
        }
        private PresetLineDashValue val;

        public PresetLineDashValue Value
        {
            get { return val; }
            set { val = value; }
        }


        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("prstDash"))
            {
                Value = c.GetOptionalEnum("val", PresetLineDashValue.Solid);
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("prstDash"))
            {
                c.SetEnum("val", Value);
            }
        }
    }
}